import { http } from "@/utils/http"

export interface singerApplyVO {
  "id": number,
  "uid": string,
  "uname": string,
  "email": string,
  "phone": string,
  "sex": string,
  "birthday": Date,
  "avatarUrl": string,
  "description": string,
  "status": string
}

export const singerApplyAPI = () => {
  const getUser = (name:string): any => {
    return http.get(`user/singers/getApplySinger?name=${name}`);
  };

  const getUserByName = (name:string,page:number,rows:number): any => {
    return http.get(`user/page?key=${name}&page=${page}&rows=${rows}`);
  };
  const addUser = (data: singerApplyVO): any => {
    return http.post("user/adduser", data );
  };
  const updateUser = (data: singerApplyVO): any => {
    return http.put("user", data);
  };
  const deleteUser = (data: singerApplyVO): any => {
    // return http.delete("user", data);
  };
  return {
    getUser,
    getUserByName,
    addUser,
    updateUser,
    deleteUser
  };
}